for ii in $(find *.root -type l)
do
unlink $ii
done

id=$1

mcid=$( expr $id + 50 )

mdir0=$(echo ../../../more_MCjet_10032014/g25finish)
mdir1=$(echo ../../../more_MCjet_10032014/g25finish/Beta22*)

#mdir0=../../../hyperbin_MCjet_11042014/e27finish
#mdir1=../../../hyperbin_MCjet_11042014/e27finish


for ii in $(find  ../RenorWOele/*$id*Comb*.root $mdir0/../direct*/hist*/*direct*id$mcid\.root)

do 
    echo $ii
    ff=$(basename $ii)
    ln -s $ii $ff
done

for ii in $(find  $mdir1/RenorWOele/*cmpEta*GrID$id*.root)
do 
    echo $ii
    ff=$(basename $ii)
    ln -s $ii MC$ff
done

#cmpGSI corrected
for ii in $(find /hera/alice/xlu/workspace/hera2dbetabloch/FracFunc_10-d-e/VeryGood_UsedInNote_old/more_datajet_10032014/CorrectedResults/withSc_r2465/cmpEta_TPC1_GrID$id/*/Comb*.root)
do
echo $ii
    ff=$(basename $ii)
    tag=$(basename $(dirname $ii))
    ln -s $ii GSI$tag$ff
done

exit

#cmpGSI
for ii in $(find /hera/alice/xlu/workspace/hera2dbetabloch/FracFunc_10-d-e/VeryGood_UsedInNote/more_datajet_10032014/g25finish/Beta22_r2417-2420/cmpEta_TPC1TOF9_GrID$id/*/Comb*.root)
do
echo $ii
    ff=$(basename $ii)
    tag=$(basename $(dirname $ii))
    ln -s $ii GSI$tag$ff
done

exit

#for cmpTPC
for ii in $(find ../../g25finish/Beta22*/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii 
done


exit



exit

#for cmpXmin
for ii in $(find ../../g25finish/Beta22*/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii Xmin-9$ff
done

exit

#cmpBeta
for ii in $(find ../Beta22*/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii Beta22$ff
done

exit

for ii in $(find ../Beta22_Xmin-9_pBpdp5_ancopt01_r2230/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii new$ff
done

exit


exit

for ii in $(find ../goodCp_Beta22_ancopt1_Xmin-9/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii oldtest$ff
done

exit


for ii in $(find ../../veryGood/g09finish/Beta22*70/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii oldtest$ff
done

exit

for ii in $(find ../Beta22_Xmin-9_rb1_2170/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii Xmin-9$ff
done


exit

for ii in $(find ../Beta22_Xmin-9_rb1_2154/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii rb1$ff
done

exit

